<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page session="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/WEB-INF/jspf/links.jspf"%>
<script src="${pageContext.request.contextPath}/resources/js/registration.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><spring:message code="company.registration" /></title>
</head>
<body>
	<div id="wrapper">
		<!-- header -->
		<div id="header">
			<%@ include file="/WEB-INF/jspf/header.jspf"%>
		</div>

		<!-- top menu -->
		<div id="menu">
			<ul>
				<c:if test="${pageContext.response.locale == 'en'}">
					<li class="active"><a href="?lang=en"><c:out value="en" /></a></li>
					<li>|</li>
					<li><a href="?lang=ru"><c:out value="ru" /></a></li>
				</c:if>
				<c:if test="${pageContext.response.locale == 'ru'}">
					<li><a href="?lang=en"><c:out value="en" /></a></li>
					<li>|</li>
					<li class="active"><a href="?lang=ru"><c:out value="ru" /></a></li>
				</c:if>
			</ul>
				<span><a
				style="text-decoration: underline;"
				href="<c:url value="/pages/login" />"><spring:message
						code="company.login" /></a>
			</span>
			<span>
</span>
		</div>

		<!-- bodywrap -->
		<div id="bodytop">&nbsp;</div>

		<div id="bodywrap">
		
			<div class="errors">
				<span id="username-required-error"><spring:message code="company.registration.valid.required.username"/></span>
				<span id="username-short-error"><spring:message code="company.registration.valid.login.short"/></span>
				<span id="email-required-error"><spring:message code="company.registration.valid.required.email"/></span>
				<span id="email-wrong-error"><spring:message code="company.registration.valid.wrong.email"/></span>
				<span id="password-required-error"><spring:message code="company.registration.valid.required.password" /></span>
				<span id="password-short-error"><spring:message code="company.registration.valid.password.short" /></span>
				<span id="password-match-error"><spring:message code="company.registration.valid.passwords.do.not.match"/></span>
			</div>

			<div id="contentbody">
			
			<img src="${pageContext.request.contextPath}/resources/images/loading.gif" id="load"/>
			
				<p>
					<spring:message code="company.registration" />
				</p>
				<hr>
				<form:form id="login-content" modelAttribute="user">
						<div class="error" id="form-error">
						</div>
						<span id="seccess">
							<spring:message code="company.registration.seccess"/>
							<br>
							<spring:message code="company.registration.success.sing.in"/>
						</span>
						<div class="fields">
							<form:label path="username"><spring:message code="company.login.login" /></form:label>
						</div>
						<div>
							<spring:message code="company.login.login" var="login"/>
							<form:input path="username" type="text"  placeholder="${login}" required="true"/>
							<form:errors path="username" cssClass="error"/>
						</div>
						<div id="login-error" class="error"></div>
						<div class="fields">
							<form:label path="email">Email</form:label>
						</div>
						<div>
							<form:input path="email" type="text" placeholder="Email"  required="true"/>
							<form:errors path="email" cssClass="error"/>
						</div>
						<div id="email-error" class="error"></div>
						<div class="fields">
							<form:label path="password"><spring:message code="company.login.password" /></form:label>
						</div>
						<div>
 							<spring:message code="company.login.password" var="pass"/>
							<form:input type="password"  path="password"  placeholder="${pass}" required="true"/>
							<form:errors path="password" cssClass="error"/>
						</div>
						<div class="fields">
							<label for="conf-password"><spring:message code="company.login.confirm.password" /></label>
						</div>
						<div>
							<input type="password" id="conf-password" name="conf-password" placeholder="<spring:message code="company.login.password" />" >
						</div>
						<div id="password-error" class="error"></div>
						<br>
						<input id="submit" type="button" value="<spring:message code="company.registration" />" />				
				</form:form>
			</div>

		</div>
		<div id="bodybottom">&nbsp;</div>
		<div id="footer">
			<%@ include file="/WEB-INF/jspf/footer.jspf"%>
		</div>
		<!-- end side menu -->
	</div>
	<!-- end wrapper -->

</body>
</html>